package com.huangliusong.product.exception;

import com.huangliusong.product.enums.ResultEnum;


/**
 * @author huangliusong
 * @since 2018/10/27
 * {@link }
 */

public class ProductException extends RuntimeException {
    private Integer code;


    public ProductException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code=resultEnum.getCode();
    }
}
